//
//  ILMainViewController.m
//  ILife
//
//  Created by lanou on 15/10/26.
//  Copyright © 2015年 ILife. All rights reserved.
//

#import "ILMainViewController.h"
#import "ILCarViewController.h"
#import "ILFashionViewController.h"
#import "ILMusicViewController.h"
#import "ILVideoViewController.h"
#import "ILHomeViewController.h"
@interface ILMainViewController ()

@end

@implementation ILMainViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    ILFashionViewController *fashionVC = [[ILFashionViewController alloc]init];
    UINavigationController *fashionNVC = [[UINavigationController alloc]initWithRootViewController:fashionVC];
  
    fashionNVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"爱时尚" image:[[UIImage imageNamed:@"fashion"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)] tag:111];
    
    ILVideoViewController *videoVC = [[ILVideoViewController alloc]init];
    UINavigationController *videoNVC = [[UINavigationController alloc]initWithRootViewController:videoVC];
    videoNVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"爱生活" image:[[UIImage imageNamed:@"video"]  imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)] tag:222];
    
    ILMusicViewController *musicVC = [[ILMusicViewController alloc]init];
    UINavigationController *musicNVC = [[UINavigationController alloc]initWithRootViewController:musicVC];
    musicNVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"爱音乐" image:[[UIImage imageNamed:@"music"]  imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)] tag:333];
    
    ILCarViewController *carVC = [[ILCarViewController alloc]init];
    UINavigationController *carNVC = [[UINavigationController alloc]initWithRootViewController:carVC];
    carNVC.tabBarItem = [[UITabBarItem alloc] initWithTitle:@"爱汽车" image:[[UIImage imageNamed:@"car"]  imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)] tag:444];
    
    
    ILHomeViewController *homeVC = [[ILHomeViewController alloc]init];
    UINavigationController *homeNVC = [[UINavigationController alloc]initWithRootViewController:homeVC];
    homeNVC.tabBarItem = [[UITabBarItem alloc]initWithTitle:@"设置" image:[[UIImage imageNamed:@"set"] imageWithRenderingMode:(UIImageRenderingModeAlwaysOriginal)]tag:555];
    
    
//  设置所有颜色为黑色
    [[UINavigationBar appearance] setTintColor:[UIColor blackColor]];
    
    NSArray *navigationControllers = [NSArray arrayWithObjects:fashionNVC,videoNVC,musicNVC,carNVC, homeNVC ,nil];
    self.viewControllers = navigationControllers;
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
